# Installation

## Requirements

### Docker

[This page](https://docs.docker.com/get-docker/) should be enough to guide you on installing docker. But here is a quick rundown for GNU+Linux:

```sh
# Debian / Trisquel
sudo apt-get install docker docker-engine docker.io containerd runc
# Arch Linux / Parabola
sudo pacman -S docker
# Fedora
sudo dnf install docker-ce docker-ce-cli containerd.io
# Void Linux / Ymir
sudo xbps-install docker
```

Add yourself to `docker` group:

```sh
sudo usermod -aG docker $USER
```

### Local Tunneling

Install one of these tunneling service to access the Drone UI from an URL generated by these services. It makes it easy to self host without having a server/domain of your own.

#### pgrok

[pgrok](https://github.com/jerson/pgrok) is a fork of previously Free Software service ngrok. [Download a release](https://github.com/jerson/pgrok/releases) and continue:

```sh
# Debian / Trisquel
sudo dpkg -i pgrok_*_linux_arm64.deb
# Fedora
sudo dnf install pgrok_*_linux_amd64.rpm
# Arch Linux / Parabola
sudo pacman -S binutils
ar x pgrok_*_linux_arm64.deb data.tar.xz
sudo tar xf data.tar.xz -C /
rm data.tar.xz
# Void Linux / Ymir
sudo xbps-install binutils
ar x pgrok_*_linux_arm64.deb data.tar.xz
sudo tar xf data.tar.xz -C /
rm data.tar.xz
```

#### localtunnel

It's easy to install with npm and widely suggested because of it's ease of use. One of the downsides is that the url changes every time you start, so you'll have to change the URL in OAuth Application settings when it changes.

```sh
# Debian / Trisquel
sudo apt install nodejs npm
# Fedora
sudo dnf install nodejs
# Arch Linux
sudo pacman -S nodejs
# Void Linux / Ymir
sudo xbps-install nodejs
```

```sh
npm install -g localtunnel
```

#### tunnelto

[tunnelto](https://github.com/agrinman/tunnelto) which powers [tunnelto.dev](https://tunnelto.dev/) is written in Rust. Requires you to get an API key from their website and put it in `TUNNELTO_API_KEY` on `config.sh`.

To install, download `tunnelto-linux.tar.gz` from [tunnelto releases](https://github.com/agrinman/tunnelto/releases) page, then:

```sh
sudo tar xf tunnelto-linux.tar.gz -C /usr/local/bin
```

## Configuration

```sh
git clone https://notabug.org/adnan360/droney.git
cd droney
cp -i config.sample.sh config.sh
```

See [Configuration](config.md) documentation for details on how to edit `config.sh`.
